package com.pro.common.service.sitecontent.enums.init;

import com.pro.common.api.CommonConst;
import com.pro.common.api.enums.EnumSysRole;
import com.pro.common.service.sitecontent.enums.EnumAuthRouteType;
import com.pro.common.service.sitecontent.enums.init.IEnumToDbEnumAuthRoute;
import com.pro.framework.api.enums.EnumToDbEnum;
import com.pro.framework.api.enums.IEnumToDbEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

import static com.pro.common.api.enums.EnumSysRole.ADMIN;
import static com.pro.common.service.sitecontent.enums.EnumAuthRouteType.*;

/**
 * 路由配置 基础
 * userMoneyWait
 * userMoneyWaitRecord
 * posterCode
 * authRoleRoute
 * sysMultiClassRelation
 * 暂时不做路由
 */
@Getter
@AllArgsConstructor
public enum EnumAuthRouteAdmin implements IEnumToDbEnumAuthRoute {
    catalog_config(ADMIN, null, CATALOG, "系统设置", null, "el-icon-s-tools", null, null, null, null, null, 200000, true, null),
    admin(ADMIN, catalog_config, MENU, "管理员", "/sys/admin", null, null, null, null, null, null, 200400, true, null),
    admin_QUERY(ADMIN, admin, BUTTON, "查询", null, null, "admin", null, null, null, null, 200400, true, null),
    admin_ALL(ADMIN, admin, BUTTON, "管理", null, null, "#ALL#admin", null, null, null, null, 200401, true, null),
    log(ADMIN, catalog_config, MENU, "日志", "/sys/log", null, null, null, null, null, null, 200100, true, null),
    log_QUERY(ADMIN, log, BUTTON, "查询", null, null, "log", null, null, null, null, 200100, true, null),
    log_ALL(ADMIN, log, BUTTON, "管理", null, null, "#ALL#log,/log/view", null, null, null, null, 200101, true, null),
    authRoute(ADMIN, catalog_config, MENU, "菜单", "/sys/authRoute", null, null, null, null, null, null, 200500, true, null),
    authRoute_QUERY(ADMIN, authRoute, BUTTON, "查询", null, null, "authRoute", null, null, null, null, 200500, true, null),
    authRoute_ALL(ADMIN, authRoute, BUTTON, "管理", null, null, "#ALL#authRoute", null, null, null, null, 200501, true, null),
    authRole(ADMIN, catalog_config, MENU, "角色", "/sys/authRole", null, null, null, null, null, null, 200600, true, null),
    authRole_QUERY(ADMIN, authRole, BUTTON, "查询", null, null, "authRole", null, null, null, null, 200600, true, null),
    authRole_ALL(ADMIN, authRole, BUTTON, "管理", null, null, "#ALL#authRole", null, null, null, null, 200601, true, null),
    authDict(ADMIN, catalog_config, MENU, "字典", "/sys/authDict", null, null, null, null, null, null, 200100, true, null),
    authDict_QUERY(ADMIN, authDict, BUTTON, "查询", null, null, "authDict", null, null, null, null, 200100, true, null),
    authDict_ALL(ADMIN, authDict, BUTTON, "管理", null, null, "#ALL#authDict", null, null, null, null, 200101, true, null),
    COMMON_TABLE_QUERY(ADMIN, catalog_config, URI, "通用表单访问权限", null, null, "/commonTable/info/**", null, null, null, null, 200200, true, null),
    SYSTEM_reloadTranslateKeys(ADMIN, catalog_config, URI, "生成翻译键值", null, null, "/dev/reloadTranslateKeys", null, null, null, null, 200300, true, null),

//    posterCode(ADMIN, catalog_content, MENU, "固有文章编号", "/content/posterCode", null, null, null, null, null, null, 180800, null),
//    authRoleRoute(ADMIN, catalog_config, MENU, "角色权限", "/authRoleRoute", null, null, null, null, null, null, null),

    ;
    private final EnumSysRole sysRole;
    private final EnumAuthRouteAdmin pcode;
    private final EnumAuthRouteType type;
    private final String routeName;
    private final String componentPath;
    private final String icon;
    private final String permissionPaths;
    private final String pic;
    private final String url;
    private final String remark;
    private final Boolean enabled;
    private final Integer sort;
    private final Boolean showFlag;
    /**
     * 统一重置修改掉,这个配置时间以前的,旧的配置
     */
    private final String forceChangeTime;

    //    @Override
//    public String getToDbCode() {
//        return sysRole + CommonConst.Str.SPLIT + name();
//    }
}
